package com.zry.config.userlocal;

import com.zry.entity.User;

public class UserThreadLocal {

    private static ThreadLocal<User> userThreadLocal = new ThreadLocal<>();

    public static void put(User user){
        userThreadLocal.set(user);
    }

    public static User get(){
       return userThreadLocal.get();
    }

    public static void clear(){
        userThreadLocal.remove();
    }
}
